{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ECG DB 2 - MIT-BIH Atrial Fibrillation\n",
    "### Sebastian D. Goodfellow, Ph.D."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Setup Notebook"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import 3rd party libraries\n",
    "import sys\n",
    "\n",
    "# Import local Libraries\n",
    "sys.path.insert(0, r'C:\\Users\\sebig\\Documents\\Code\\deep_ecg')\n",
    "from deepecg.training.data.datasets.afdb import AFDB\n",
    "\n",
    "# Configure Notebook\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "%matplotlib inline\n",
    "%load_ext autoreload\n",
    "%autoreload 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Generate Database"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generating Raw MIT-BIH Atrial Fibrillation Database ...\n",
      "Downloading files...\n",
      "Finished downloading files\n",
      "Complete!\n",
      "\n",
      "Generating Processed MIT-BIH Atrial Fibrillation Database ...\n",
      "(17019,)\n",
      "Complete!\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Initialize\n",
    "af_db = AFDB()\n",
    "\n",
    "# Generate raw database\n",
    "af_db.generate_raw_db()\n",
    "\n",
    "# Generate processed database\n",
    "af_db.generate_processed_db()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
